package com.server.model.all.user.dto;

import com.server.model.all.constant.PatternConstant;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import org.hibernate.validator.constraints.Length;

@Getter
@Setter
public class ForgetPasswordDto {
    /**
     * 用户名
     * @author LXC
     * @date 2022/3/13 22:22
     */
    private String userName;

    /**
     * 邮箱
     * @author LXC
     * @date 2022/6/21 20:40
     */
    private String email;

    /**
     * 手机号
     * @author LXC
     * @date 2022/6/21 20:40
     */
    private String mobile;

    /**
     * 短信验证码
     * @author LXC
     * @date 2022/6/23 21:56
     */
    @NotBlank(message = "验证码不可为空")
    @Length(min = 4,max = 4,message = "验证码长度必须等于4")
    private String smsCode;


    /**
     * 密码
     * @author LXC
     * @date 2022/6/21 20:40
     */
    @NotBlank(message = "密码不可为空")
    @Length(min = 6,message = "密码长度必须大于等于6")
    @Length(max = 20,message = "密码长度必须小于等于20")
    @Pattern(regexp = PatternConstant.CONTAIN_CAPITALIZE_LETTER,message = "密码需要包含大写字母")
    @Pattern(regexp = PatternConstant.CONTAIN_LOW_LETTER,message = "密码需要包含小写字母")
    @Pattern(regexp = PatternConstant.CONTAIN_NUMBER,message = "密码需要包含数字")
    private String passWord;

}
